Skip to content

tape: captions last per word, playback speed divides time - #727

Merged
foxnne merged 2 commits into
mainfrom
automation/caption-time
Oct 21, 2026
Merged

foxnne merged 2 commits into
mainfrom
automation/caption-time

Conversation

@foxnne

@foxnne foxnne commented Oct 20, 2026 •

Copy link
Copy Markdown
Collaborator

Part of fizzyedit/work#16

What changes

  • A demo caption stays up Script.reading_ms_per_word (300 ms) per word of title and text at 1x, between Script.reading_min_ms (2 s) and Script.reading_max_ms (12 s, the old ceiling, kept). All three are named constants. The old character-count formula is gone, so long captions no longer vanish quickly.
  • Playback speed moves from Player.rate into Sequencer.speed: a plain f32, default 1, clamped to 0.5..4 (setSpeed), stepped through Sequencer.speeds = 0.5, 0.75, 1, 1.5, 2, 3, 4 (stepSpeed). playUntil turns a frame's wall time into demo time. A caption's ms is demo time too, so captions and the demo speed up together with no separate conversion.
  • Seek and rewind ask advance for a demo time, which no speed enters, so they stay exact at any speed.
  • The 0.25x notch is dropped (the floor is 0.5). Player.rate/setRate/stepRate are replaced by player.seq.speed/setSpeed/stepSpeed; the overlay, Editor.zig and the demo.speed command follow. No UI added; the slider is a later PR.
  • docs/AUTOMATION.md describes both.

Verification (Linux cloud)

  • Unit tests: word counts, the 2 s floor and its boundary, the 12 s ceiling, title plus text; every notch (0.5 to 4) through playUntil; clamping and stepping; a rewind and replay lands on the same moment at every speed.
  • Gates: scripts/check-fmt.sh, scripts/zb build, build test, build test-integration (92/92 steps succeeded), build check-web, build test-sdk-version, build lint, build check-tests-reached all pass.
  • Not seen in a running app: no UI change besides the speed label reading seq.speed.
  • The SDK fingerprint did not move; sdk_version untouched.

Generated by Claude Code

Review fixes:

  • Caption reading time is capped again at 12 s (reading_max_ms, the old ceiling), with a test.
  • Sequencer.wallMs is removed: a caption's ms is demo time and playback speed advances demo time, so captions already scale with no conversion. docs/AUTOMATION.md says so.
  • Behaviour change: the 0.25x notch is gone (speeds are 0.5 to 4). The demo.speed command's rate still accepts 0 to 4; values between 0 and 0.5 clamp to 0.5, now stated in its description.

claude and others added 2 commits October 20, 2026 21:12
A caption stays up 0.3 s a word of title and text at 1x, never under 2 s
(Script.reading_ms_per_word, reading_min_ms), so long captions no longer
vanish quickly. The player's rate becomes Sequencer.speed, a plain f32 in
0.5..4 (default 1) stepped through 0.5, 0.75, 1, 1.5, 2, 3, 4; it divides
demo time on the wall clock (playUntil, wallMs). Seek and rewind ask
advance for a demo time, so they stay exact at any speed.

Part of fizzyedit/work#16

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Lc78nzw65EqAttcHSvg2XF
@foxnne
foxnne force-pushed the automation/caption-time branch from 11bf60a to bf72b84 Compare October 21, 2026 18:58
@foxnne
foxnne marked this pull request as ready for review October 21, 2026 19:31
@foxnne
foxnne added this pull request to the merge queue Oct 21, 2026
Merged via the queue into main with commit 2956330 Oct 21, 2026
11 checks passed
@foxnne
foxnne deleted the automation/caption-time branch October 21, 2026 19:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants